<template>
  <main class="ly-layout">
    <!--轮播图  内容-->
    <div class="grid grid-margin">
      <div class="grid-content-2">
        <div class="grid-swipe">
          <div class="swipe-core">
            <div class="swipe-shim">
              <div class="news-card">
                <a href="https://www.baidu.com" target="_blank">
                  <div class="news-card-images">
                    <div class="card-images">
                      <picture class="v-img card-cover">
                        <img src="https://img.meishibiexuejava.cn/zkc-prod/ly/ly-images/1/1.png">
                      </picture>
                    </div>
                  </div>
                </a>
                <div class="news-card-info">
                  <div class="card-info">
                    <a href="https://www.baidu.com" target="_blank">
                      <h3 class="info-title" title="林妙妙这段舞蹈，是我对赵今麦最大的误解！">
                        林妙妙这段舞蹈，是我对赵今麦最大的误解！</h3>
                    </a>
                    <p class="info-bottom">
                      <a class="info-text">14万点赞</a>
                      <a class="info-owner">
                        <span class="info-author">荒草音乐</span>
                      </a>
                    </p>
                  </div>
                </div>
              </div>
              <div class="news-card">
                <a href="https://www.baidu.com" target="_blank">
                  <div class="news-card-images">
                    <div class="card-images">
                      <picture class="v-img card-cover">
                        <img src='https://img.meishibiexuejava.cn/zkc-prod/ly/ly-images/1/1.png'>
                      </picture>
                    </div>
                  </div>
                </a>
                <div class="news-card-info">
                  <div class="card-info">
                    <a href="https://www.baidu.com" target="_blank">
                      <h3 class="info-title" title="林妙妙这段舞蹈，是我对赵今麦最大的误解！">
                        林妙妙这段舞蹈，是我对赵今麦最大的误解！</h3>
                    </a>
                    <p class="info-bottom">
                      <a class="info-text">14万点赞</a>
                      <a class="info-owner">
                        <span class="info-author">荒草音乐</span>
                      </a>
                    </p>
                  </div>
                </div>
              </div>
              <div class="shim-card">3</div>
              <div class="shim-card">4</div>
            </div>
            <div class="swipe-body">
              <shuffling/>
            </div>
          </div>
        </div>

        <div class="news-card">
          <a href="https://www.baidu.com" target="_blank">
            <div class="news-card-images">
              <div class="card-images">
                <picture class="v-img card-cover">
                  <img src="https://img.meishibiexuejava.cn/zkc-prod/ly/ly-images/1/1.png">
                </picture>
              </div>
            </div>
          </a>
          <div class="news-card-info">
            <div class="card-info">
              <a href="https://www.baidu.com" target="_blank">
                <h3 class="info-title" title="林妙妙这段舞蹈，是我对赵今麦最大的误解！">
                  林妙妙这段舞蹈，是我对赵今麦最大的误解！</h3>
              </a>
              <p class="info-bottom">
                <a class="info-text">14万点赞</a>
                <a class="info-owner">
                  <span class="info-author">荒草音乐</span>
                </a>
              </p>
            </div>
          </div>
        </div>

        <div class="news-card">
          <a href="https://www.baidu.com" target="_blank">
            <div class="news-card-images">
              <div class="card-images">
                <picture class="v-img card-cover">
                  <img src="https://img.meishibiexuejava.cn/zkc-prod/ly/ly-images/1/2.png">
                </picture>
              </div>
            </div>
          </a>
          <div class="news-card-info">
            <div class="card-info">
              <a href="https://www.baidu.com" target="_blank">
                <h3 class="info-title" title="林妙妙这段舞蹈，是我对赵今麦最大的误解！">
                  林妙妙这段舞蹈，是我对赵今麦最大的误解！</h3>
              </a>
              <p class="info-bottom">
                <a class="info-text">14万点赞</a>
                <a class="info-owner">
                  <span class="info-author">荒草音乐</span>
                </a>
              </p>
            </div>
          </div>
        </div>

        <div class="news-card">
          <a href="https://www.baidu.com" target="_blank">
            <div class="news-card-images">
              <div class="card-images">
                <picture class="v-img card-cover">
                  <img src="https://img.meishibiexuejava.cn/zkc-prod/ly/ly-images/1/3.png">
                </picture>
              </div>
            </div>
          </a>
          <div class="news-card-info">
            <div class="card-info">
              <a href="https://www.baidu.com" target="_blank">
                <h3 class="info-title" title="林妙妙这段舞蹈，是我对赵今麦最大的误解！">
                  林妙妙这段舞蹈，是我对赵今麦最大的误解！</h3>
              </a>
              <p class="info-bottom">
                <a class="info-text">14万点赞</a>
                <a class="info-owner">
                  <span class="info-author">荒草音乐</span>
                </a>
              </p>
            </div>
          </div>
        </div>

        <div class="news-card">
          <a href="https://www.baidu.com" target="_blank">
            <div class="news-card-images">
              <div class="card-images">
                <picture class="v-img card-cover">
                  <img src="https://img.meishibiexuejava.cn/zkc-prod/ly/ly-images/1/4.png">
                </picture>
              </div>
            </div>
          </a>
          <div class="news-card-info">
            <div class="card-info">
              <a href="https://www.baidu.com" target="_blank">
                <h3 class="info-title" title="林妙妙这段舞蹈，是我对赵今麦最大的误解！">
                  林妙妙这段舞蹈，是我对赵今麦最大的误解！</h3>
              </a>
              <p class="info-bottom">
                <a class="info-text">14万点赞</a>
                <a class="info-owner">
                  <span class="info-author">荒草音乐</span>
                </a>
              </p>
            </div>
          </div>
        </div>

        <div class="news-card">
          <a href="https://www.baidu.com" target="_blank">
            <div class="news-card-images">
              <div class="card-images">
                <picture class="v-img card-cover">
                  <img src="https://img.meishibiexuejava.cn/zkc-prod/ly/ly-images/1/5.png">
                </picture>
              </div>
            </div>
          </a>
          <div class="news-card-info">
            <div class="card-info">
              <a href="https://www.baidu.com" target="_blank">
                <h3 class="info-title" title="林妙妙这段舞蹈，是我对赵今麦最大的误解！">
                  林妙妙这段舞蹈，是我对赵今麦最大的误解！</h3>
              </a>
              <p class="info-bottom">
                <a class="info-text">14万点赞</a>
                <a class="info-owner">
                  <span class="info-author">荒草音乐</span>
                </a>
              </p>
            </div>
          </div>
        </div>

        <div class="news-card">
          <a href="https://www.baidu.com" target="_blank">
            <div class="news-card-images">
              <div class="card-images">
                <picture class="v-img card-cover">
                  <img src="https://img.meishibiexuejava.cn/zkc-prod/ly/ly-images/1/6.png">
                </picture>
              </div>
            </div>
          </a>
          <div class="news-card-info">
            <div class="card-info">
              <a href="https://www.baidu.com" target="_blank">
                <h3 class="info-title" title="林妙妙这段舞蹈，是我对赵今麦最大的误解！">
                  林妙妙这段舞蹈，是我对赵今麦最大的误解！</h3>
              </a>
              <p class="info-bottom">
                <a class="info-text">14万点赞</a>
                <a class="info-owner">
                  <span class="info-author">荒草音乐</span>
                </a>
              </p>
            </div>
          </div>
        </div>

        <div class="news-card">
          <a href="https://www.baidu.com" target="_blank">
            <div class="news-card-images">
              <div class="card-images">
                <picture class="v-img card-cover">
                  <img src="https://img.meishibiexuejava.cn/zkc-prod/ly/ly-images/1/7.png">
                </picture>
              </div>
            </div>
          </a>
          <div class="news-card-info">
            <div class="card-info">
              <a href="https://www.baidu.com" target="_blank">
                <h3 class="info-title" title="林妙妙这段舞蹈，是我对赵今麦最大的误解！">
                  林妙妙这段舞蹈，是我对赵今麦最大的误解！</h3>
              </a>
              <p class="info-bottom">
                <a class="info-text">14万点赞</a>
                <a class="info-owner">
                  <span class="info-author">荒草音乐</span>
                </a>
              </p>
            </div>
          </div>
        </div>

        <div class="news-card">
          <a href="https://www.baidu.com" target="_blank">
            <div class="news-card-images">
              <div class="card-images">
                <picture class="v-img card-cover">
                  <img src="https://img.meishibiexuejava.cn/zkc-prod/ly/ly-images/1/8.png">
                </picture>
              </div>
            </div>
          </a>
          <div class="news-card-info">
            <div class="card-info">
              <a href="https://www.baidu.com" target="_blank">
                <h3 class="info-title" title="林妙妙这段舞蹈，是我对赵今麦最大的误解！">
                  林妙妙这段舞蹈，是我对赵今麦最大的误解！</h3>
              </a>
              <p class="info-bottom">
                <a class="info-text">14万点赞</a>
                <a class="info-owner">
                  <span class="info-author">荒草音乐</span>
                </a>
              </p>
            </div>
          </div>
        </div>

        <div class="news-card">
          <a href="https://www.baidu.com" target="_blank">
            <div class="news-card-images">
              <div class="card-images">
                <picture class="v-img card-cover">
                  <img src="https://img.meishibiexuejava.cn/zkc-prod/ly/ly-images/1/8.png">
                </picture>
              </div>
            </div>
          </a>
          <div class="news-card-info">
            <div class="card-info">
              <a href="https://www.baidu.com" target="_blank">
                <h3 class="info-title" title="林妙妙这段舞蹈，是我对赵今麦最大的误解！">
                  林妙妙这段舞蹈，是我对赵今麦最大的误解！</h3>
              </a>
              <p class="info-bottom">
                <a class="info-text">14万点赞</a>
                <a class="info-owner">
                  <span class="info-author">荒草音乐</span>
                </a>
              </p>
            </div>
          </div>
        </div>

        <div class="news-card">
          <a href="https://www.baidu.com" target="_blank">
            <div class="news-card-images">
              <div class="card-images">
                <picture class="v-img card-cover">
                  <img src="https://img.meishibiexuejava.cn/zkc-prod/ly/ly-images/1/8.png">
                </picture>
              </div>
            </div>
          </a>
          <div class="news-card-info">
            <div class="card-info">
              <a href="https://www.baidu.com" target="_blank">
                <h3 class="info-title" title="林妙妙这段舞蹈，是我对赵今麦最大的误解！">
                  1林妙妙这段舞蹈，是我对赵今麦最大的误解！</h3>
              </a>
              <p class="info-bottom">
                <a class="info-text">14万点赞</a>
                <a class="info-owner">
                  <span class="info-author">荒草音乐</span>
                </a>
              </p>
            </div>
          </div>
        </div>

      </div>
      <div class="grid-content-2-btn">
        <button class="roll-btn">
          <i class="el-icon-refresh"></i>
          <span>换一换</span>
        </button>
      </div>
    </div>

    <!--占位-->
    <div class="grid grid-margin"></div>

    <!--推广-->
    <div class="grid">
      <div class="grid-content-3">
        <div class="grid-header">
          <div class="left">
            <i class="el-icon-s-promotion"></i>
            <a class="title"><span>推广</span></a>
          </div>
          <div class="right"></div>
        </div>
        <div class="grid-body">

          <div v-for="(item,index) in popularizeList" class="news-card" :key="index">
            <router-link :to="/news/+item.articleId" target="_blank">
              <div class="news-card-images">
                <div class="card-images">
                  <picture class="v-img card-cover">
                    <img :src="img(item.articleThumbnail)">
                  </picture>
                </div>
              </div>
            </router-link>
            <div class="news-card-info">
              <div class="card-info">
                <router-link :to="/news/+item.articleId" target="_blank">
                  <h3 class="info-title" :title="item.articleName">{{ item.articleName }}</h3>
                </router-link>
                <p class="info-bottom">
                  <a class="info-text">14万点赞</a>
                  <a class="info-owner">
                    <span class="info-author">荒草音乐</span>
                  </a>
                </p>
              </div>
            </div>
          </div>

        </div>
      </div>
    </div>

    <!--广告-->
    <div class="grid-banner">
      <a class="v-img">
        <img src="../../../assets/gg1.png" alt="广告"/>
      </a>
    </div>

    <!--内容 排行榜-->
    <ranking/>

    <!--内容-->
    <card/>

    <!--内容 选项卡 排行榜 -->



  </main>
</template>

<script>
import shuffling from "@/web/components/shuffling";
import {queryPopularize} from "@/api/web/content";
import Ranking from "@/web/home/core/ranking.vue";
import Card from "@/web/home/core/card.vue";
import '@/style/web.css'

export default {
  name: "ly_core",
  components: {Card, Ranking, shuffling},
  data() {
    return {
      popularizeList: [],
    }
  },
  methods: {

    /** 获取推广内容 */
    queryPopularize() {
      queryPopularize().then(res => {
        this.popularizeList = res.data
      })
    },


    /** 路径拼接 */
    img(url) {
      return this.lingyun_img(url)
    },

  },

  created() {// 初始化
    this.queryPopularize();
  }

}


</script>

<!-- 去掉 scoped 全局生效 -->
<style scoped>


</style>
